﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using sql表结构对比.DataBusinessLayer;
using sql表结构对比.Model;
namespace sql表结构对比.Repository
{
    


    class tb_Dictionary
    {
        public Dictionary<string, string> tb_dic = new Dictionary<string, string>();
        public  Dictionary<string, int> relationshipIndex = new Dictionary<string, int>();
        //public tb_Dictionary() {
        //    DedicatedService ds = new DedicatedService();
        //    int temp = 0;
        //    foreach (tablerelationship item in ds.GetTableRelationship())
        //    {
        //        temp++;
             
        //            if (tb_dic.ContainsKey(item.basicinfo[2]))
        //            {

        //            }
        //            else
        //            {
        //                tb_dic.Add(item.basicinfo[2], item.basicinfo[3]);
        //                relationshipIndex.Add(item.basicinfo[2], temp);
        //            }
        //    }
        //}
        public tb_Dictionary(List<string> basicinfo) {
            DedicatedService ds = new DedicatedService();
            int temp = 0;
            foreach (tablerelationship item in ds.GetTableRelationship())
            {
                temp++;
                if (basicinfo[0] == item.basicinfo[0] && basicinfo[1] == item.basicinfo[1]) {
                    if (tb_dic.ContainsKey(item.basicinfo[2]))
                    {

                    }
                    else
                    {
                        tb_dic.Add(item.basicinfo[2], item.basicinfo[3]);
                        relationshipIndex.Add(item.basicinfo[2], temp);
                    }
                }
            
         
               
            }
        }

    }
}
